package com.sure.supermarketserver.sell.order.impl;

import com.sure.supermarketserver.common.Utils;
import com.sure.supermarketserver.sell.order.OrderDto;
import com.sure.supermarketserver.sell.order.OrderService;
import com.sure.supermarketserver.sell.order.dao.OrderDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

@Service
@Transactional
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderDao OrderDao;

    @Override
    public Map<String, Object> findOrderList(OrderDto dto) {
        return Utils.getPage(dto, () -> OrderDao.findOrderList(dto));
    }
    @Override
    public Map<String, Object> findOrderDetails(OrderDto dto) {
        return Utils.getPage(dto, () -> OrderDao.findOrderDetails(dto));
    }
    }

